import React, { useEffect, useState } from 'react';
import { Layout, Table, Progress,Card} from 'antd';
import CourseSchedule from '@/components/CourseSchedule';
import { useSelector } from 'react-redux';
import { getUserId } from '@/utils/userId';

const { Header, Content, Footer } = Layout;

const TeachPlan = () => {
  const [loading, setLoading] = useState(false);
  const userId=getUserId()
  //const [userID,setUserID] = useState('null')
  useEffect(()=>{
     console.log(userId)
  },[userId])
  const fetchData = () => {
    // Simulate fetching data
    setLoading(true);
    setTimeout(() => {
      setLoading(false);
    }, 2000);
  };

  return (
    <Layout>
      <Header style={{ color: 'white' }}>教学计划</Header>
      <Content style={{ padding: '10 50px' }}>
        
        <Card>
          <h3>课程表</h3>
        <div><CourseSchedule student_id={userId}/></div>
        </Card>
        <div style={{position:'relative',top:'5px',left:'40px'}}>驾校管理系统&copy;2024-2099</div>
      </Content>
      {/* <Footer>
     <div style={{position:'absolute',left:'50%'}}>驾校管理系统</div>
   </Footer> */}
    </Layout>
  );
};

export default TeachPlan;